﻿using System;
using System.Collections.Generic;

namespace SocialFront.Providers.Member
{
    [SectionName("SocialFrontMember")]
    public abstract class MemberBase : SocialFrontProviderBase
    {
        public abstract Entities.Member Create(Entities.Member member);

        public abstract Entities.Member UpdateMember(Entities.Member member);

        public abstract Entities.Member GetMemberById(int id);

        public abstract Entities.Member GetMemberFromEmail(string email);

        public abstract List<Entities.Member> GetAllMembers();
        public abstract List<Entities.Member> GetAllMembers(int? pageSize);
        public abstract List<Entities.Member> GetAllMembers(int? pageSize, int? page);
        public abstract List<Entities.Member> GetAllMembers(int? pageSize, int? page, out int total);

        //public abstract void AddMemberToCache(Entities.Member member, bool useSession, TimeSpan timeSpanForCookie);

        public abstract Entities.Member LoginMember(string username, string password);

        public abstract Entities.Member LoginMember(Entities.Member member);

        public abstract void LogoutCurrentMember();

        public abstract Entities.Member GetCurrentMember();

        public abstract void ChangePassword();

        // TODO: Think about member vs user for non-Umbraco systems - should there be a separate user provider? probably.

        //public abstract void ClearMemberFromClient();

        //public abstract void RemoveMemberFromCache(int id);
    }
}
